using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using TelnetExpect;
using System.IO;

namespace TelnetTests
{
    [TestFixture]
    public class TelnetStream_NegotiationNegative : TestsBase
    {
        //--------
        [Test]
        public void Unacceptable_Do()
        {
            byte[] input = { IAC, DO, OptionFooOne };
            DoTest(input, ExpectedInputNone, ExpectedResponsesOne);
        }

        [Test]
        public void Unacceptable_Dont()
        {
            byte[] input = { IAC, DONT, OptionFooOne };
            DoTest(input, ExpectedInputNone, ExpectedResponsesNone);
        }

        [Test]
        public void Unacceptable_Will()
        {
            byte[] input = { IAC, WILL, OptionFooOne };
            DoTest(input, ExpectedInputNone, ExpectedResponsesOneDont);
        }

        [Test]
        public void Unacceptable_Wont()
        {
            byte[] input = { IAC, WONT, OptionFooOne };
            DoTest(input, ExpectedInputNone, ExpectedResponsesNone);
        }

        //--------
        [Test]
        public void Unacceptable_Twice_Do()
        {
            byte[] input = { IAC, DO, OptionFooOne };
            DoTest(ArrayUtils_NTimes(input, 2), ExpectedInputNone, ArrayUtils_NTimes(ExpectedResponsesOne, 2));
        }

        [Test]
        public void Unacceptable_Twice_Dont()
        {
            byte[] input = { IAC, DONT, OptionFooOne };
            DoTest(ArrayUtils_NTimes(input, 2), ExpectedInputNone, ExpectedResponsesNone);
        }

        [Test]
        public void Unacceptable_Twice_Will()
        {
            byte[] input = { IAC, WILL, OptionFooOne };
            DoTest(ArrayUtils_NTimes(input, 2), ExpectedInputNone, ArrayUtils_NTimes(ExpectedResponsesOneDont, 2));
        }

        [Test]
        public void Unacceptable_Twice_Wont()
        {
            byte[] input = { IAC, WONT, OptionFooOne };
            DoTest(ArrayUtils_NTimes(input, 2), ExpectedInputNone, ExpectedResponsesNone);
        }

    }
}
